.class public Lcom/instagram/android/gl/NativeBridge;
.super Ljava/lang/Object;
.source "NativeBridge.java"


# static fields
.field public static final SIZE_UNSPECIFIED:I = -0x1

.field private static final TAG:Ljava/lang/String; = "NativeBridge"

.field private static sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

.field private static sLoaded:Z


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 22
    const/4 v0, 0x0

    sput-boolean v0, Lcom/instagram/android/gl/NativeBridge;->sLoaded:Z

    .line 87
    const/4 v0, 0x0

    sput-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 16
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 40
    return-void
.end method

.method public static createTexture(Ljava/lang/String;)I
    .locals 1
    .parameter "filePath"

    .prologue
    .line 146
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    if-eqz v0, :cond_0

    .line 147
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0, p0}, Lcom/instagram/creation/base/d;->a(Landroid/content/Context;Ljava/lang/String;)I

    move-result v0

    .line 149
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static disableAdvancedResize()V
    .locals 2

    .prologue
    .line 126
    invoke-static {}, Lcom/instagram/j/a/b;->a()Lcom/instagram/j/a/b;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Lcom/instagram/j/a/b;->e(Z)Z

    .line 127
    return-void
.end method

.method public static finishedDrawing()V
    .locals 1

    .prologue
    .line 292
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->finishedDrawing()V

    .line 293
    return-void
.end method

.method public static getBordersEnabled()Z
    .locals 1

    .prologue
    .line 177
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getBordersEnabled()Z

    move-result v0

    return v0
.end method

.method public static getCameraOrientation()I
    .locals 1

    .prologue
    .line 240
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getCameraOrientation()I

    move-result v0

    return v0
.end method

.method public static getCropBottom()I
    .locals 1

    .prologue
    .line 273
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getCroppingRect()Landroid/graphics/Rect;

    move-result-object v0

    .line 274
    if-eqz v0, :cond_0

    .line 275
    iget v0, v0, Landroid/graphics/Rect;->bottom:I

    .line 276
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static getCropLeft()I
    .locals 1

    .prologue
    .line 248
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getCroppingRect()Landroid/graphics/Rect;

    move-result-object v0

    .line 249
    if-eqz v0, :cond_0

    .line 250
    iget v0, v0, Landroid/graphics/Rect;->left:I

    .line 251
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static getCropRight()I
    .locals 1

    .prologue
    .line 266
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getCroppingRect()Landroid/graphics/Rect;

    move-result-object v0

    .line 267
    if-eqz v0, :cond_0

    .line 268
    iget v0, v0, Landroid/graphics/Rect;->right:I

    .line 269
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static getCropTop()I
    .locals 1

    .prologue
    .line 259
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getCroppingRect()Landroid/graphics/Rect;

    move-result-object v0

    .line 260
    if-eqz v0, :cond_0

    .line 261
    iget v0, v0, Landroid/graphics/Rect;->top:I

    .line 262
    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static getCurrentFilter()I
    .locals 1

    .prologue
    .line 232
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getCurrentFilter()I

    move-result v0

    return v0
.end method

.method public static getCurrentRotation()I
    .locals 1

    .prologue
    .line 280
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getCurrentRotation()I

    move-result v0

    return v0
.end method

.method public static getDisplayBasedMaxTextureSize()I
    .locals 2

    .prologue
    .line 204
    invoke-static {}, Lcom/instagram/e/a/a;->a()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/instagram/k/k;->c(Landroid/content/Context;)Landroid/util/DisplayMetrics;

    move-result-object v0

    .line 205
    iget v0, v0, Landroid/util/DisplayMetrics;->widthPixels:I

    const/16 v1, 0x140

    if-ne v0, v1, :cond_0

    .line 206
    const/16 v0, 0x400

    .line 208
    :goto_0
    return v0

    :cond_0
    const v0, 0x7fffffff

    goto :goto_0
.end method

.method public static getIsLowEndDevice()Z
    .locals 1

    .prologue
    .line 296
    invoke-static {}, Lcom/instagram/android/creation/c/a;->a()Z

    move-result v0

    return v0
.end method

.method public static getLuxEnabled()Z
    .locals 1

    .prologue
    .line 173
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getLuxEnabled()Z

    move-result v0

    return v0
.end method

.method public static getLuxSupported()Z
    .locals 1

    .prologue
    .line 284
    invoke-static {}, Lcom/instagram/android/creation/c/a;->a()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static getMasterTextureEnforcedSize()I
    .locals 1

    .prologue
    .line 185
    invoke-static {}, Lcom/instagram/android/creation/c/a;->a()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 192
    const/16 v0, 0x400

    .line 194
    :goto_0
    return v0

    :cond_0
    const/4 v0, -0x1

    goto :goto_0
.end method

.method public static getMasterTexturePath()Ljava/lang/String;
    .locals 1

    .prologue
    .line 142
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getMasterTexturePath()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public static getMirrorMasterTexture()Z
    .locals 1

    .prologue
    .line 169
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getMirrorMasterTexture()Z

    move-result v0

    return v0
.end method

.method public static native getPhotoFilters()[Lcom/instagram/android/gl/NativeFilter;
.end method

.method public static getTiltShiftEnabled()Z
    .locals 1

    .prologue
    .line 181
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getTiltShiftEnabled()Z

    move-result v0

    return v0
.end method

.method public static getTiltShiftMode()I
    .locals 1

    .prologue
    .line 228
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getTiltShiftMode()I

    move-result v0

    return v0
.end method

.method public static getTiltShiftOriginX()F
    .locals 1

    .prologue
    .line 212
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getTiltShiftOriginX()F

    move-result v0

    return v0
.end method

.method public static getTiltShiftOriginY()F
    .locals 1

    .prologue
    .line 216
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getTiltShiftOriginY()F

    move-result v0

    return v0
.end method

.method public static getTiltShiftRadius()F
    .locals 1

    .prologue
    .line 220
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getTiltShiftRadius()F

    move-result v0

    return v0
.end method

.method public static getTiltShiftSupported()Z
    .locals 1

    .prologue
    .line 288
    invoke-static {}, Lcom/instagram/android/creation/c/a;->a()Z

    move-result v0

    if-nez v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static getTiltShiftTheta()F
    .locals 1

    .prologue
    .line 224
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getTiltShiftTheta()F

    move-result v0

    return v0
.end method

.method public static getTotalRotation()F
    .locals 1

    .prologue
    .line 165
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getTotalRotation()F

    move-result v0

    return v0
.end method

.method public static isCameraOrientedCrop()Z
    .locals 1

    .prologue
    .line 236
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->isCameraOrientedCrop()Z

    move-result v0

    return v0
.end method

.method public static isCropped()Z
    .locals 1

    .prologue
    .line 244
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->getCroppingRect()Landroid/graphics/Rect;

    move-result-object v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    return v0

    :cond_0
    const/4 v0, 0x0

    goto :goto_0
.end method

.method public static declared-synchronized loadLibraries()Z
    .locals 2

    .prologue
    .line 26
    const-class v1, Lcom/instagram/android/gl/NativeBridge;

    monitor-enter v1

    :try_start_0
    sget-boolean v0, Lcom/instagram/android/gl/NativeBridge;->sLoaded:Z
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-nez v0, :cond_0

    .line 28
    :try_start_1
    const-string v0, "scrambler"

    invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V

    .line 29
    const-string v0, "glcommon"

    invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V

    .line 30
    const-string v0, "instagram_jni"

    invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V

    .line 31
    const/4 v0, 0x1

    sput-boolean v0, Lcom/instagram/android/gl/NativeBridge;->sLoaded:Z
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0
    .catch Ljava/lang/UnsatisfiedLinkError; {:try_start_1 .. :try_end_1} :catch_0

    .line 37
    :cond_0
    :goto_0
    :try_start_2
    sget-boolean v0, Lcom/instagram/android/gl/NativeBridge;->sLoaded:Z
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_0

    monitor-exit v1

    return v0

    .line 26
    :catchall_0
    move-exception v0

    monitor-exit v1

    throw v0

    .line 32
    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method public static native mirrorMasterTexture()V
.end method

.method public static mirrorTiltShift()V
    .locals 1

    .prologue
    .line 255
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->mirrorTiltShift()V

    .line 256
    return-void
.end method

.method public static onFinishLoadMasterTexture()V
    .locals 1

    .prologue
    .line 159
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    if-eqz v0, :cond_0

    .line 160
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->onFinishLoadMasterTexture()V

    .line 162
    :cond_0
    return-void
.end method

.method public static onStartLoadMasterTexture()V
    .locals 1

    .prologue
    .line 153
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    if-eqz v0, :cond_0

    .line 154
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    invoke-interface {v0}, Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;->onStartLoadMasterTexture()V

    .line 156
    :cond_0
    return-void
.end method

.method public static native redrawBlur()V
.end method

.method public static removeMasterTextureDelegate(Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;)V
    .locals 1
    .parameter "delegate"

    .prologue
    .line 135
    sget-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    if-ne p0, v0, :cond_0

    .line 137
    const/4 v0, 0x0

    sput-object v0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    .line 139
    :cond_0
    return-void
.end method

.method public static native renderBuffer(IZ)I
.end method

.method public static native renderFullSizeBuffer()I
.end method

.method public static native rotateMasterTexture()V
.end method

.method public static native saveImageInBuffer(Ljava/lang/String;II)J
.end method

.method public static setMasterTextureDelegate(Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;)V
    .locals 0
    .parameter "delegate"

    .prologue
    .line 131
    sput-object p0, Lcom/instagram/android/gl/NativeBridge;->sImageProcessorDelegate:Lcom/instagram/android/gl/NativeBridge$ImageProcessorDelegate;

    .line 132
    return-void
.end method

.method public static native setRotationAngle(F)V
.end method

.method public static native setTiltShiftEnabled(Z)V
.end method

.method public static native setTiltShiftMode(I)V
.end method

.method public static native setTiltShiftOrigin(FF)V
.end method

.method public static native setTiltShiftRadius(F)V
.end method

.method public static native setTiltShiftTheta(F)V
.end method

.method public static softReport(Ljava/lang/String;Ljava/lang/String;)V
    .locals 0
    .parameter "category"
    .parameter "msg"

    .prologue
    .line 122
    invoke-static {p0, p1}, Lcom/instagram/g/c;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 123
    return-void
.end method

.method public static native tiltShiftFadeInMaskHighlight()V
.end method

.method public static native tiltShiftFadeOutMaskHighlight()V
.end method

.method public static native tiltShiftRemoveMaskHighlight()V
.end method

.method public static native useFilter(I)V
.end method
